enhance: reduce idle compaction allocations - #23
Merged
sunby merged 1 commit intoSep 9, 2026
Merged
Conversation
Signed-off-by: sunby <sunbingyi1992@gmail.com>
sunby
merged commit Sep 9, 2026
2fe7373
into
codex/load-1m-segments-pr-stack-rebased-qv-work
10 of 13 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reduce temporary allocations in periodic schema-bump and storage-version/format compaction checks, especially when collections do not need new tasks.
No new configuration, trigger intervals, eligibility rules, protocol or scheduler changes. Full scans remain; event-driven discovery is not part of this PR.
Base and reference
Base:
sunby/milvus:codex/load-1m-segments-pr-stack-rebased-qv-workatb18065d489bcdc559e94b00b4bbc05ea758813e1(includes the merged quota PR #22). This PR contains one compaction-only commit and five files.Related scalability context: milvus-io#48867. This does not claim to resolve that QueryNode recovery issue.
Verification
Rerun on the submission base using
-tags dynamic,test -gcflags="all=-N -l"and the existing local native libraries. These tests use in-memory metadata/mocks and do not require a running external etcd.TestCompactionTriggerManagerSuite/TestGetExpectedSegmentSizeexcluded as described below.-race.0 issues.git diff --checkpassed.Mandatory pre-push commands were run in a disposable validation worktree:
make lint-fixcompleted gofumpt/gci and ran root-module lint, then failed atinternal/metastore/kv/querycoord/kv_catalog_test.go:372:15: undefined: mocks. The file has the identical blob in base and head. The pkg/client lint stages were not reached.internal/core/run_clang_format.sh internal/corecompleted with clang-format 15.0.7. None of the five PR files needed formatter changes; unrelated formatter changes are excluded.The existing local
TestGetExpectedSegmentSize/all_DISKANNassertion fails both with and without the policy changes (expected 200 MiB, observed 100 MiB). It is not fixed in this PR.Allocation benchmark
Apple M5, darwin/arm64, Go 1.26.5; the same 10,000-collection workload on the submission base, with baseline policies supplied through a Go overlay. Each collection has one up-to-date flushed V3 segment and a 16-field schema. Median of five runs,
-benchtime=3x -benchmem -tags dynamic,test -gcflags="all=-N -l":The allocator is a local stub, excluding the production ID-allocation call path. These are synthetic allocation measurements, not production CPU/GC or search-latency improvements.
Full
make test-go, production-build end-to-end acceptance and a same-load deployed MixCoord CPU/GC/latency comparison remain unverified.